package com.alex.springboot.config;

import lombok.Data;
import lombok.ToString;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.PropertySource;
import org.springframework.stereotype.Component;

@ConfigurationProperties(prefix = "my")
@Component
@PropertySource("classpath:my.properties")
@Data
@ToString
public class My {

    private String name;
    private Integer age;

}
